package org.hxyjs.dao;


import com.fasterxml.jackson.core.JsonProcessingException;
import org.hxyjs.dto.DTO;
import org.springframework.data.redis.core.StringRedisTemplate;

import java.io.IOException;
import java.util.List;

public interface RedisDao {
    public void delete(String key) ;
    public String get(String key) ;
    public <T> DTO<T> getByJSon(String key, Class<T> clazz) ;

    public  <T> void save(String key,T t ,Long time) ;

    public <T> List<String> getValuesListByKeyRegexp(StringRedisTemplate stringRedisTemplate, String pattern) throws IOException ;
    public <T> T get(String keyId,Class<T> clazz);
    public  <T> void saveJson(String key,T t ,Long time) throws JsonProcessingException ;
}
